import Vue from 'vue'
import VueRouter from 'vue-router'
import CampusBinhai from '../components/CampusBinhai.vue'
import CampusChashan from '../components/CampusChashan.vue'
import CampusYueqing from '../components/CampusYueqing.vue'
import StudentSystem from '../components/StudentSystem.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'CampusBinhai',
    component: CampusBinhai
  },
  {
    path: '/chashan',
    name: 'CampusChashan',
    component: CampusChashan,
    children: [
      {
        path: 'wuhao',
        name: 'WuHao',
        component: { template: '<div>五号楼信息</div>' }
      },
      {
        path: 'liuhao',
        name: 'LiuHao',
        component: { template: '<div>六号楼信息</div>' }
      },
      {
        path: 'qihao',
        name: 'QiHao',
        component: { template: '<div>七号楼信息</div>' }
      }
    ]
  },
  {
    path: '/yueqing',
    name: 'CampusYueqing',
    component: CampusYueqing
  },
  {
    path: '/student',
    name: 'StudentSystem',
    component: StudentSystem
  }
]

const router = new VueRouter({
  routes
})

export default router